package com.pig4cloud.pig.module.service.devices;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.pig.common.mybatis.core.BaseService;
import com.pig4cloud.pig.module.api.entity.devices.DevicesEggGetRecord;
import com.pig4cloud.pig.module.api.entity.excel.DevicesGetRecordExcel;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Map;

/**
 * 鸡蛋柜领取记录 Service接口
 *
 * @author ruoyi
 * @date 2022-01-06
 */
public interface IDevicesEggGetRecordService extends BaseService<DevicesEggGetRecord> {

	Page<DevicesEggGetRecord> selectCellRecordList(Page<DevicesEggGetRecord> page , Map<String,Object> map);

	List<DevicesEggGetRecord> selectCellRecordList(Map<String,Object> map);

	Page<DevicesGetRecordExcel> selectTongjiByDeviceId(Page<DevicesGetRecordExcel> page , @Param("map") Map<String,Object> map);

	List<DevicesGetRecordExcel> selectTongjiByDeviceId(Map<String,Object> map);

	/**
	 * 按照时间段类型来统计 各类型下的数据
	 * @param type  0 - 按照月为单位统计   1 - 按照 周 为单位 统计
	 * @return
	 */
	Map<String,Object> getGerRecordCharts(int type);
}
